package org.jeecg.modules.third.jg.report.freight.information.model;

import com.thoughtworks.xstream.annotations.XStreamAlias;
import lombok.Data;
import org.jeecg.modules.third.jg.report.freight.information.dto.DriverDTO;
import org.jeecg.modules.third.jg.report.freight.information.dto.VehicleDTO;
import org.jeecg.modules.third.jg.report.freight.information.dto.enterprise.EnterpriseDTO;
import org.jeecg.modules.third.jg.report.freight.information.dto.financial.FinancialDTO;
import org.jeecg.modules.third.jg.report.freight.information.dto.shippingnote.ShippingNoteDTO;
import org.jeecg.modules.third.jg.report.freight.information.dto.vehiclelocation.VehicleLocationDTO;

import javax.xml.bind.annotation.XmlElement;
import java.io.Serializable;

@Data
@XStreamAlias("reqInfo")
public class LiaoningReqModel {

    private Root root;


    @Data
    public static class Root implements Serializable {

        private LiaoningReqModel.Header header;

        public LiaoningReqModel.Header getHeader() {
            return header;
        }

        public void setHeader(LiaoningReqModel.Header header) {
            this.header = header;
        }

        @XStreamAlias("body")
        private DriverDTO driverDTO;

        @XStreamAlias("body")
        private VehicleDTO vehicleDTO;

        @XStreamAlias("body")
        private EnterpriseDTO enterprise;

        @XStreamAlias("body")
        private FinancialDTO financial;

        @XStreamAlias("body")
        private ShippingNoteDTO shippingNote;

        @XStreamAlias("body")
        private VehicleLocationDTO vehicleLocation;
    }

    @Data
    public static class Header implements Serializable {

        //报文参考号  报文的唯一标识符，由系统按GUID规则自动产生。
        @XStreamAlias("messagereferencenumber")
        private String messageReferenceNumber;

        //报文名称  报文中文名称：电子运单、资金流水单、车辆信息单、驾驶员信息单。
        @XStreamAlias("documentname")
        private String documentName;

        //报文版本号
        @XStreamAlias("documentversionnumber")
        private String documentVersionNumber;

        //发送方代码  省监测系统交换代码/网络货运经营者交换代码（过渡期内）
        @XStreamAlias("sendercode")
        private String senderCode;

        //企业代码，即企业在省平台的用户代码。
        @XStreamAlias("enterprisesendercode")
        private String enterpriseSenderCode;

        //报文发送的日期时间。YYYYMMDDhhmmss
        @XStreamAlias("messagesendingdatetime")
        private String messageSendingDateTime;

        //业务接口代码
        @XStreamAlias("ipctype")
        private String ipcType;

        //辽宁监管专属报文密码，中惠客户04f072c54a44a92842d0298a46fedc38
        private String passw;

        //辽宁监管专属函数功能，默认9
        private String messagefunctioncode = "9";

        //辽宁专属接收代码,默认wcjc0002
        private String recipientcode = "wcjc0002";

        //令牌
        private String token;
        //物流交换  必填，系统接入分配的交换代码

        public String getMessageReferenceNumber() {
            return messageReferenceNumber;
        }

        public void setMessageReferenceNumber(String messageReferenceNumber) {
            this.messageReferenceNumber = messageReferenceNumber;
        }

        public String getDocumentName() {
            return documentName;
        }

        public void setDocumentName(String documentName) {
            this.documentName = documentName;
        }

        public String getDocumentVersionNumber() {
            return documentVersionNumber;
        }

        public void setDocumentVersionNumber(String documentVersionNumber) {
            this.documentVersionNumber = documentVersionNumber;
        }

        public String getSenderCode() {
            return senderCode;
        }

        public void setSenderCode(String senderCode) {
            this.senderCode = senderCode;
        }

        public String getEnterpriseSenderCode() {
            return enterpriseSenderCode;
        }

        public void setEnterpriseSenderCode(String enterpriseSenderCode) {
            this.enterpriseSenderCode = enterpriseSenderCode;
        }

        public String getMessageSendingDateTime() {
            return messageSendingDateTime;
        }

        public void setMessageSendingDateTime(String messageSendingDateTime) {
            this.messageSendingDateTime = messageSendingDateTime;
        }

        public String getIpcType() {
            return ipcType;
        }

        public void setIpcType(String ipcType) {
            this.ipcType = ipcType;
        }

        public String getToken() {
            return token;
        }

        public void setToken(String token) {
            this.token = token;
        }

        public String getPassw() {
            return passw;
        }

        public void setPassw(String passw) {
            this.passw = passw;
        }

        public String getMessagefunctioncode() {
            return messagefunctioncode;
        }

        public void setMessagefunctioncode(String messagefunctioncode) {
            this.messagefunctioncode = messagefunctioncode;
        }

        public String getRecipientcode() {
            return recipientcode;
        }

        public void setRecipientcode(String recipientcode) {
            this.recipientcode = recipientcode;
        }
    }

}
